<?php

use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateDeviceContactsTable extends Migration {

	/**
	 * Run the migrations.
	 *
	 * @return void
	 */
	public function up()
	{
		Schema::create('device_contact', function(Blueprint $table)
		{
			$table->increments('id');
			$table->timestamps();

			//关联tyw_devices
			$table->integer('device_id');
			//varchar 11 手机号码
			$table->string('cellphone',11);
			//varchar 20 省代码
			$table->string('province',20);
			//varchar 20 市代码
			$table->string('city',20);
			//varchar 20 区代码
			$table->string('area',20);
			//varchar 255 详细地址
			$table->string('address');
			//varchar 255 固话
			$table->string('fixed_line');
			//varchar 255 传真
			$table->string('fax');
			//varchar 255 邮编
			$table->string('zcode');

			$table->softDeletes();

		});
	}

	/**
	 * Reverse the migrations.
	 *
	 * @return void
	 */
	public function down()
	{
		Schema::drop('device_contacts');
	}

}
